package com.xuhai.config;

import java.util.Properties;

public class MyConfig {

    private static Properties properties = new Properties();

    static {
        try {
            properties.load(MyConfig.class.getResourceAsStream("config.properties"));
        }catch (Exception e){
            throw new RuntimeException("配置文件加载出错");
        }
    }

    public static String getString(String propertyName) {
        return properties.getProperty(propertyName);
    }
}
